void read_all_hist() {

  TFile *f = new TFile("mc12.lailin.prw.root", "r");
  TIter nextkey(f->GetListOfKeys());
  TKey *key;
  TH1F *hist;
  TObject *obj;
  int i=0;
  while (key=(TKey*)nextkey()) {
    obj = (TObject*)key->ReadObj();
    if( obj->IsA()->InheritsFrom(TH1::Class()) ) {
      hist = (TH1F*)obj;
      double tot =  hist->GetEntries();
      cout << hist->GetName() << ": " << hist->GetEntries() << endl;
      if( tot==0 ) cout << "Warning for empty Hist: " << hist->GetName() << endl;
      i++;
    }
  }
}
